package com.qdu.servlet;

import com.qdu.service.impl.LogServiceImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *管理员删除一个日志
 * @author Lenovo
 */
@WebServlet("/dols")
public class deleteOneLogServlet extends HttpServlet{

    LogServiceImpl logserviceimpl=new LogServiceImpl();
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String id=req.getParameter("logId");
        
        int rows=logserviceimpl.deleteThisLog(id);
        
        if(rows!=0)
        {
            resp.getWriter().println(true);
        }
        else{
            resp.getWriter().println(false);
        }
        
    }
}
